package com.esyoga.yoyoga.handler;

import com.esyoga.yoyoga.pojo.TInform;
import com.esyoga.yoyoga.service.NewshintService;
import lombok.Data;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Data
@Controller
@RequestMapping("/News")
public class NewshintHandler {

    @Resource
    private NewshintService newshintService;

    @RequestMapping("/showNews")
    @ResponseBody
    public List<TInform> showNews(Integer userid, Integer usertype){

        return  newshintService.showNews(userid,usertype);
    }
}
